#ifndef _PROTOCOL_H_
#define _PROTOCOL_H_

namespace Proto
{

namespace Client2Server
{

	struct SpeedAdjust
	{
		short xAdjust, yAdjust;
		bool isBraking;
		
		template <class T>
		void traverseMembers(const T &d)
		{
			d & xAdjust & yAdjust & isBraking;
		}
	};

	struct Fire
	{
		short xCoord, yCoord;
		short power;
		
		template <class T>
		void traverseMembers(const T &d)
		{
			d & xCoord & yCoord & power;
		}
	};

}

enum
{
	FIELD_NOT_VISIBLE = 0,
	FIELD_EMPTY,
	FIELD_SWAMP,
	FIELD_RIVER,
	FIELD_BRIDGE,
	FIELD_FOREST,
	FIELD_CHARGE_STATION,
	FIELD_BONUS,
	FIELD_ENEMY
};

enum
{
	RESULT_WINNER,
	RESULT_KILLED,
	RESULT_CHEATING,
	RESULT_NONE,
	RESULT_GAME_OVER
};

}

#endif
